package com.biao.test_annotation;

import lombok.Data;

@Data
public class InitDemo {
    private String name;
    private Integer age;

    public String publicParam;

    public InitDemo() {
        System.out.println("调用无参构造...");
    }

    public InitDemo(String name, Integer age) {
        this.name = name;
        this.age = age;
        System.out.println("调用有参构造...");
    }

    private void privateTest() {
        System.out.println("私有方法...");
    }

    private Integer privateTest2(Integer a, Integer b) {
        System.out.println("privateTest2: " + (a + b));
        return a + b;
    }

    @InitMethod
    public void init() {
        System.out.println("init...");
    }

    @InitMethod
    public void test() {
        System.out.println("test...");
    }
}
